import 'package:wanxiang_app/generated/json/base/json_field.dart';
import 'package:wanxiang_app/generated/json/record_list_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class RecordListEntity {
	late int code;
	late String msg;
	late List<RecordListData> data;

	RecordListEntity();

	factory RecordListEntity.fromJson(Map<String, dynamic> json) => $RecordListEntityFromJson(json);

	Map<String, dynamic> toJson() => $RecordListEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class RecordListData {
	late int id;
	@JSONField(name: "article_id")
	late int articleId;
	@JSONField(name: "channel_id")
	late int channelId;
	late String title;
	@JSONField(name: "category_text")
	late String categoryText;
	@JSONField(name: "category_id")
	late int categoryId;
	@JSONField(name: "role_text")
	late String roleText;
	@JSONField(name: "role_id")
	late int roleId;
	@JSONField(name: "user_id")
	late int userId;
	@JSONField(name: "channel_name")
	late String channelName;
	@JSONField(name: "user_name")
	late String userName;
	@JSONField(name: "add_time")
	late String addTime;
	@JSONField(name: "sell_price")
	late String sellPrice;
	@JSONField(name: "img_url")
	late String imgUrl;
	late int status;
	late int guid;
	@JSONField(name: "is_self")
	late int isSelf;
	@JSONField(name: "game_account")
	late String gameAccount;

	RecordListData();

	factory RecordListData.fromJson(Map<String, dynamic> json) => $RecordListDataFromJson(json);

	Map<String, dynamic> toJson() => $RecordListDataToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}